package xin.yangshuai.juc01.threadlocal;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * Hello
 *
 * @author shuai
 * @date 2022/3/6
 */
public class Hello {
    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();
        Set<Map.Entry<String, String>> entrySet = map.entrySet();
        for (Map.Entry<String, String> stringStringEntry : entrySet) {
            stringStringEntry.getKey();
            stringStringEntry.getValue();
        }

        ThreadLocal<String> threadLocal = new ThreadLocal();
        threadLocal.set("hello");

        threadLocal.set("world");

        threadLocal.set("nihao");

        String s = threadLocal.get();

        System.out.println(s);
    }
}
